package com.hison.tandainbao.entiy.pojo.domain;


import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @TableName tb_job
 */
@TableName(value ="tb_job")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TbJob implements Serializable {
    /**
     * 主键，自增长
     */
    @TableId
    private Long id;

    /**
     * 用户ID，发布者ID
     */
    private Long userId;

    /**
     * 公司名称
     */
    private String company;

    /**
     * 公司描述信息
     */
    private String companyDescription;

    /**
     * 联系方式
     */
    private String contactNumber;

    /**
     * 职位标题
     */
    private String jobTitle;

    /**
     * 职位类别
     */
    private Long jobTypeId;

    /**
     * 职位描述
     */
    private String jobDescription;

    /**
     * 职务所需要的技能
     */
    private String requiredSkills;

    /**
     * 工作地点
     */
    private String location;

    /**
     * 职位状态: 0正在招募，1停止招募
     */
    private Integer status;

    /**
     * 其他信息
     */
    private String description;

    /**
     * 职位审核状态: 0未审核，1审核成功，2审核失败
     */
    private Integer auditStatus;

    /**
     * 公司图片 URL
     */
    private String companyImageUrl;

    /**
     * 发布时间
     */
    private Date publishTime;



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbJob other = (TbJob) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCompany() == null ? other.getCompany() == null : this.getCompany().equals(other.getCompany()))
            && (this.getCompanyDescription() == null ? other.getCompanyDescription() == null : this.getCompanyDescription().equals(other.getCompanyDescription()))
            && (this.getContactNumber() == null ? other.getContactNumber() == null : this.getContactNumber().equals(other.getContactNumber()))
            && (this.getJobTitle() == null ? other.getJobTitle() == null : this.getJobTitle().equals(other.getJobTitle()))
            && (this.getJobTypeId() == null ? other.getJobTypeId() == null : this.getJobTypeId().equals(other.getJobTypeId()))
            && (this.getJobDescription() == null ? other.getJobDescription() == null : this.getJobDescription().equals(other.getJobDescription()))
            && (this.getRequiredSkills() == null ? other.getRequiredSkills() == null : this.getRequiredSkills().equals(other.getRequiredSkills()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getAuditStatus() == null ? other.getAuditStatus() == null : this.getAuditStatus().equals(other.getAuditStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCompany() == null) ? 0 : getCompany().hashCode());
        result = prime * result + ((getCompanyDescription() == null) ? 0 : getCompanyDescription().hashCode());
        result = prime * result + ((getContactNumber() == null) ? 0 : getContactNumber().hashCode());
        result = prime * result + ((getJobTitle() == null) ? 0 : getJobTitle().hashCode());
        result = prime * result + ((getJobTypeId() == null) ? 0 : getJobTypeId().hashCode());
        result = prime * result + ((getJobDescription() == null) ? 0 : getJobDescription().hashCode());
        result = prime * result + ((getRequiredSkills() == null) ? 0 : getRequiredSkills().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getAuditStatus() == null) ? 0 : getAuditStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", company=").append(company);
        sb.append(", companyDescription=").append(companyDescription);
        sb.append(", contactNumber=").append(contactNumber);
        sb.append(", jobTitle=").append(jobTitle);
        sb.append(", jobTypeId=").append(jobTypeId);
        sb.append(", jobDescription=").append(jobDescription);
        sb.append(", requiredSkills=").append(requiredSkills);
        sb.append(", location=").append(location);
        sb.append(", status=").append(status);
        sb.append(", description=").append(description);
        sb.append(", auditStatus=").append(auditStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}